<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>留言管理</title>
</head>
<style>
#comment{ width:500px; border:1px solid #999;}
#comments{ width:499px; border:1px solid #999;}
#comments ul .b{ background-color:#CCC; border-bottom:1px solid #000;}
#title{ color:#F30;}
li{ list-style:none;}
.a li{ list-style:none; float:left;}
</style>
<body>
<h2>留言管理</h2>
<div id="comment">
  <h3><samp id="title">新闻标题：</samp><?php echo $rs['title']; ?></h3>
<?php for($j=0;$j<count($sr);$j++){ ?>
  <div id="comments">
   <ul>
     <form id="form1" name="form1" method="post" action="index.php?p=admin&c=comment&a=delete&id=<?php echo $sr[$j]['id']; ?>">
     <li><b><?php echo $sr[$j]['reporter']; ?></b>留言:</li>
     <li><input type="text" name="textfield" value="<?php echo $sr[$j]['content']; ?>" />
         <input type="submit" name="button" id="button" value="删除" />
     </li>
    </form>
   </ul>
   <ul>
    <?php for($i=0;$i<count($ss);$i++){ ?>
      <?php if($sr[$j]['pid']==$ss[$i]['m_pid'] && $sr[$j]['id']==$ss[$i]['m_id']){ ?>    
        <div class="b">
         <form id="form1" name="form1" method="post" action="index.php?p=admin&c=comment&a=dele&id=<?php echo $ss[$i]['id']; ?>">
          <li>留言:<b><?php echo $ss[$i]['username']; ?></b>回复<b><?php echo $sr[$j]['reporter']; ?></b></li>
          <li>内容：<?php echo $ss[$i]['content']; ?>&nbsp;&nbsp;
          <input type="submit" name="button" id="button" value="删除" /></li>
         </form>
        </div>
      <?php } ?>
    <?php } ?>
   </ul>
  </div>
<?php } ?> 
</div>
</body>
</html>
